<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Client Web Page</title>
</head>
<body>
  <h1>Welcome to the Client Web Page!</h1>
</body>

<script>

   // 创建 WebSocket 连接
    // const socket = new WebSocket('ws://localhost:33333');

    // // 监听连接打开事件
    // socket.addEventListener('open', (event) => {
    //   console.log('WebSocket connection opened:', event);
    // });

    // // 监听来自服务器的消息
    // socket.addEventListener('message', (event) => {
    //   console.log('Message from server:', event.data);
    //   alert (event.data);
    // });

    // // 监听连接关闭事件
    // socket.addEventListener('close', (event) => {
    //   console.log('WebSocket connection closed:', event);
    // });

    // // 监听错误事件
    // socket.addEventListener('error', (event) => {
    //   console.error('WebSocket error:', event);
    // });
</script>
</html>
